/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.nii.qlks.GUI;

import edu.nii.qlks.GUI.MenuMain.jfrm_ThayDoiMatKhau;
import edu.nii.qlks.ControlLayer.LoaiTaiKhoanControl;
import edu.nii.qlks.ControlLayer.TaiKhoanControl;
import edu.nii.qlks.DataTransferObject.LoaiTaiKhoanInfo;
import edu.nii.qlks.DataTransferObject.TaiKhoanInfo;
import edu.nii.qlks.GUI.MenuMain.jfrm_ThemTaiKhoan;
import java.awt.Cursor;
import java.awt.event.MouseEvent;
import java.awt.event.MouseMotionAdapter;
import java.io.File;
import java.util.Vector;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JFrame;
import javax.swing.JLayeredPane;
import javax.swing.JOptionPane;
import javax.swing.event.TreeSelectionEvent;
import javax.swing.event.TreeSelectionListener;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.DefaultTreeModel;
import javax.swing.tree.TreePath;
import edu.nii.qlks.GUI.Render.Menutree;
import edu.nii.qlks.GUI.Render.Menutree_cellrender;

/**
 *
 * @author MARS_NHO
 */
public class Menu extends javax.swing.JFrame{
    
   
    int ispermission = -1;
    TaiKhoanControl taiKhoanCT;
    TaiKhoanInfo taiKhoanInfo;
    LoaiTaiKhoanControl loaiTaiKhoanCT;
    LoaiTaiKhoanInfo loaiTaiKhoanInfo;
    JInternal_Timkiem jinternal_timkiem;
    JInternal_ThemLoaiPhong jinternal_themloaiphong;
    JInternal_Lapdanhmucphong jinternal_lapdanhmucphong;
    Jinternal_TimkiemKhachhang jinternal_timkiemkhachhang;
    
            
    /**
     * Creates new form Menu
     */
    public Menu(TaiKhoanInfo taiKhoanInfo) {
        initComponents();
        
        try {
            jinternal_lapdanhmucphong = new JInternal_Lapdanhmucphong();
            jinternal_timkiemkhachhang = new Jinternal_TimkiemKhachhang();
        } catch (Exception ex) {
            Logger.getLogger(Menu.class.getName()).log(Level.SEVERE, null, ex);
        }
        
        taiKhoanCT = new TaiKhoanControl();
        this.taiKhoanInfo = new TaiKhoanInfo();
        loaiTaiKhoanCT = new LoaiTaiKhoanControl();
        loaiTaiKhoanInfo = new LoaiTaiKhoanInfo();
 
       
       //Full Screen
       this.setExtendedState(JFrame.MAXIMIZED_BOTH);
       
        
       LayDL_DangNhap(taiKhoanInfo);
       try{
            LayQuyenTruyCap();
            addIntenal();
       }
       catch(Exception e){
           
       }
       XuLyQuyenTruyCap();
       addItemTree();
       chooseNode();
       cursor();
    }
    
    
    public void chooseNode() {

        jXTree_menu.addTreeSelectionListener(new TreeSelectionListener() {
            @Override
            public void valueChanged(TreeSelectionEvent evt) {


                TreePath path = jXTree_menu.getSelectionPath();

                try {
                    if (path != null) {
                        DefaultMutableTreeNode node = (DefaultMutableTreeNode) path.getLastPathComponent();
                        Menutree m = (Menutree) node.getUserObject();

                        if (m.getName().equals("Trợ giúp")) {
                            System.out.println("duoc");
                            jXTree_menu.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
                        }

                    }
                } catch (Exception e) {
                }

            }
        });
    }

    
    
    public void cursor(){
        jXTree_menu.addMouseMotionListener(new MouseMotionAdapter() {
            @Override
            public void mouseMoved(MouseEvent e) {
                int x = (int) e.getPoint().getX();
                int y = (int) e.getPoint().getY();
                TreePath path = jXTree_menu.getPathForLocation(x, y);

                if (path == null) {
                    jXTree_menu.setCursor(Cursor.getDefaultCursor());
                    
                } else {
                    jXTree_menu.setCursor(Cursor.getDefaultCursor());
                    try {
                        DefaultMutableTreeNode node = (DefaultMutableTreeNode) path.getLastPathComponent();
                        Menutree m = (Menutree) node.getUserObject();
                        if (m.getName().equals("Trợ giúp")) {
                            System.out.println("duoc");
                            jXTree_menu.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
                        }
                    } catch (Exception ex) {
                    }
                }
            }
        });
    }
    
   
    public void addItemTree(){
        DefaultMutableTreeNode root = new DefaultMutableTreeNode("QUẢN LÝ KHÁCH SẠN");
        DefaultMutableTreeNode node_quantrihethong = new DefaultMutableTreeNode("Quản trị hệ thống");
        DefaultMutableTreeNode node_quanlyphong = new DefaultMutableTreeNode("Quản lý phòng");
        DefaultMutableTreeNode node_thaydoiqd = new DefaultMutableTreeNode("Thay đổi quy định");
        DefaultMutableTreeNode node_quanlythuephong = new DefaultMutableTreeNode("Quản lý thuê - trả phòng");
        DefaultMutableTreeNode node_thongke = new DefaultMutableTreeNode("Thống kê");
        DefaultMutableTreeNode node_trogiup = new DefaultMutableTreeNode("Hướng dẫn");
        
        Menutree[] nodequanlyphong = new Menutree[]{
            new Menutree("Lập danh mục phòng", "lapdanhmucphong.png"),
            new Menutree("Tra cứu phòng", "tracuuphong.png"),
        };
        
        
        Menutree[] nodethaydoiquydinh = new Menutree[]{
            new Menutree("Cập nhật loại phòng", "capnhatloaiphong.png"),
            new Menutree("Cập nhật loại khách hàng", "loaikhachhang.png"),
            new Menutree("Thay đổi số lượng khách hàng", "soluongkhach.png"),
            new Menutree("Thay đổi tỉ lệ phụ thu", "tilephuthu.png"),
        };
        Menutree[] nodethuetraphong = new Menutree[]{
            new Menutree("Lập phiếu thuê phòng", "phieuthuephong.png"),
            new Menutree("Lập hoá đơn thanh toán", "hoadonthanhtoan.png"),
            new Menutree("Tra cứu hoá đơn", "timhoadon.png"),
        };
        Menutree[] nodethongke = new Menutree[]{
            new Menutree("Báo cáo doanh thu loại phòng", "baocaodt.png"),
            new Menutree("Báo cáo mật độ sử dụng phòng", "baocaomd.png"),
        };
        
        Menutree[] nodetrogiup = new Menutree[]{
            new Menutree("Trợ giúp", "trogiup.png"),
        };
        
        
        
        for (Menutree menu : nodequanlyphong){
            DefaultMutableTreeNode node = new DefaultMutableTreeNode(menu);
            node_quanlyphong.add(node);
        }
        for (Menutree menu : nodethaydoiquydinh){
            DefaultMutableTreeNode node = new DefaultMutableTreeNode(menu);
            node_thaydoiqd.add(node);
        }
        for (Menutree menu : nodethuetraphong){
            DefaultMutableTreeNode node = new DefaultMutableTreeNode(menu);
            node_quanlythuephong.add(node);
        }
        for (Menutree menu : nodethongke){
            DefaultMutableTreeNode node = new DefaultMutableTreeNode(menu);
            node_thongke.add(node);
        }
        for (Menutree menu : nodetrogiup){
            DefaultMutableTreeNode node = new DefaultMutableTreeNode(menu);
            node_trogiup.add(node);
        }
        
        root.add(node_quantrihethong);
        root.add(node_quanlyphong);
        root.add(node_quanlythuephong);
        root.add(node_thaydoiqd);
        root.add(node_thongke);
        root.add(node_trogiup);
        
        
        jXTree_menu.setModel(new DefaultTreeModel(root));
        jXTree_menu.setCellRenderer(new Menutree_cellrender());
        
    }
    
    public void addIntenal() throws Exception{
        
        jinternal_timkiem = new JInternal_Timkiem();
        jinternal_timkiem.setBounds(0, -24, (int)jDesktopPane1.getSize().width, (int)jDesktopPane1.getSize().height);
        jDesktopPane1.add(jinternal_timkiem, JLayeredPane.DEFAULT_LAYER);
        
        jinternal_themloaiphong = new JInternal_ThemLoaiPhong();
        jinternal_themloaiphong.setBounds(0, -24, (int)jDesktopPane1.getSize().width, (int)jDesktopPane1.getSize().height);
        jDesktopPane1.add(jinternal_themloaiphong, JLayeredPane.DEFAULT_LAYER);
        
//        jinternal_lapdanhmucphong = new JInternal_Lapdanhmucphong();
        jinternal_lapdanhmucphong.setBounds(0, -24, (int)jDesktopPane1.getSize().width, (int)jDesktopPane1.getSize().height);
        jDesktopPane1.add(jinternal_lapdanhmucphong, JLayeredPane.DEFAULT_LAYER);
        

        jinternal_timkiemkhachhang.setBounds(0, -24, (int)jDesktopPane1.getSize().width, (int)jDesktopPane1.getSize().height);
        jDesktopPane1.add(jinternal_timkiemkhachhang, JLayeredPane.DEFAULT_LAYER);
        
    }
    
    public void LayDL_DangNhap(TaiKhoanInfo taiKhoanInfo){
        this.taiKhoanInfo = taiKhoanInfo; 
    }
    
    
    
    public void LayQuyenTruyCap(){
        try {
            Vector vt = taiKhoanCT.Lay_MaLoaiTaiKhoan(taiKhoanInfo.getTenTaiKhoan());
            if (vt.size() > 0){
                Vector vt_row = (Vector)vt.get(0);
                String maTK = vt_row.get(0).toString().trim();
                System.out.println("ma loai TK: " + maTK);
                
                maTK = vt_row.get(1).toString().trim();
                jXTextField_LoaiTaiKhoan.setText(maTK);
                jXTextField_TenTaiKhoan.setText(taiKhoanInfo.getTenTaiKhoan());
                jXTextField_MaTaiKhoan.setText(taiKhoanInfo.getMaTaiKhoan());
                
                Vector _vt = loaiTaiKhoanCT.LayDS();
                if (_vt.size() > 0){
                    for (int i = 0; i < _vt.size(); i++){
                        Vector _vt_row = (Vector)_vt.get(i);
                        String maLoaiTaiKhoan = _vt_row.get(0).toString().trim();
                        System.out.println("ma loai tai khoan: " + maLoaiTaiKhoan);
                        if (taiKhoanInfo.getMaLoaiTaiKhoan().equals(maLoaiTaiKhoan)){
                            
                            ispermission = i;
                        }
                        
                        System.out.println("...."+ispermission);
                    }
                }
            }
            
        } catch (Exception ex) {
            Logger.getLogger(Menu.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
    
    public void XuLyQuyenTruyCap(){
        
        switch (ispermission){
            case 0:
                jMenu_QuanLyPhong.setEnabled(false);
                jMenu_QuanLyThueTra.setEnabled(false);
                jMenu_ThayDoiQuyDinh.setEnabled(false);
                jMenu_BaoCao.setEnabled(false);
                break;
            case 1:
                jMenuItem_ThemTaiKhoan.setEnabled(false);
                jMenuItem_LapPhieuThuePhong.setEnabled(false);
                jMenuItem_LapHoaDon.setEnabled(false);
                jMenu_BaoCao.setEnabled(false);
                break;
            case 2:
                jMenuItem_ThemTaiKhoan.setEnabled(false);
                jMenuItem_LapDanhMucPhong.setEnabled(false);
                jMenu_ThayDoiQuyDinh.setEnabled(false);
                break;
            default:
                System.out.println("--------");
                break;
        }
    }
    
    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jDesktopPane1 = new javax.swing.JDesktopPane();
        jXPanel1 = new org.jdesktop.swingx.JXPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jXTree_menu = new org.jdesktop.swingx.JXTree();
        jXPanel_ThongTin = new org.jdesktop.swingx.JXPanel();
        jXLabel_TenTaiKhoan = new org.jdesktop.swingx.JXLabel();
        jXLabel_LoaiTaiKhoan = new org.jdesktop.swingx.JXLabel();
        jXLabel_MatKhau = new org.jdesktop.swingx.JXLabel();
        jXTextField_TenTaiKhoan = new org.jdesktop.swingx.JXTextField();
        jXTextField_LoaiTaiKhoan = new org.jdesktop.swingx.JXTextField();
        jXLabel_HinhAnhTK = new org.jdesktop.swingx.JXLabel();
        jXLabel_TenTaiKhoan1 = new org.jdesktop.swingx.JXLabel();
        jXTextField_MaTaiKhoan = new org.jdesktop.swingx.JXTextField();
        jPasswordField1 = new javax.swing.JPasswordField();
        jMenuBar1 = new javax.swing.JMenuBar();
        jMenu_HeThong = new javax.swing.JMenu();
        jMenuItem_ThayDoiMatKhau = new javax.swing.JMenuItem();
        jMenuItem_ThemTaiKhoan = new javax.swing.JMenuItem();
        jMenu_QuanLyPhong = new javax.swing.JMenu();
        jMenuItem_LapDanhMucPhong = new javax.swing.JMenuItem();
        jMenuItem_TraCuuPhong = new javax.swing.JMenuItem();
        jMenuItem_TraCuuKhachHang = new javax.swing.JMenuItem();
        jMenu_QuanLyThueTra = new javax.swing.JMenu();
        jMenuItem_LapPhieuThuePhong = new javax.swing.JMenuItem();
        jMenuItem_LapHoaDon = new javax.swing.JMenuItem();
        jMenuItem_TraCuuHoaDon = new javax.swing.JMenuItem();
        jMenuItem2 = new javax.swing.JMenuItem();
        jMenu_ThayDoiQuyDinh = new javax.swing.JMenu();
        jMenuItem1 = new javax.swing.JMenuItem();
        jMenuItem_CapNhatDonGiaLoaiPhong = new javax.swing.JMenuItem();
        jMenuItem_CapNhatHeSoLoaiKhach = new javax.swing.JMenuItem();
        jMenuItem_ThemLoaiPhong = new javax.swing.JMenuItem();
        jMenuItem_ThemLoaiKhach = new javax.swing.JMenuItem();
        jMenuItem_ThayDoiTyLePhuThu = new javax.swing.JMenuItem();
        jMenuItem_ThayDoiSoLuongKhachToiDa = new javax.swing.JMenuItem();
        jMenu_BaoCao = new javax.swing.JMenu();
        jMenuItem_BaoCaoDoanhThu = new javax.swing.JMenuItem();
        jMenuItem_BaoCaoMatDo = new javax.swing.JMenuItem();
        jMenu_TroGiup = new javax.swing.JMenu();
        jMenuItem_HuongDan = new javax.swing.JMenuItem();
        jMenuItem_ThongTin = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        setMinimumSize(null);

        jDesktopPane1.setBackground(new java.awt.Color(255, 255, 255));

        jXPanel1.setBackground(new java.awt.Color(255, 255, 255));

        jScrollPane1.setViewportView(jXTree_menu);

        javax.swing.GroupLayout jXPanel1Layout = new javax.swing.GroupLayout(jXPanel1);
        jXPanel1.setLayout(jXPanel1Layout);
        jXPanel1Layout.setHorizontalGroup(
            jXPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane1)
        );
        jXPanel1Layout.setVerticalGroup(
            jXPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 122, javax.swing.GroupLayout.PREFERRED_SIZE)
        );

        jXPanel_ThongTin.setBackground(new java.awt.Color(255, 255, 255));

        jXLabel_TenTaiKhoan.setText("Tài Khoản");
        jXLabel_TenTaiKhoan.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N

        jXLabel_LoaiTaiKhoan.setText("Loại Tài Khoản");
        jXLabel_LoaiTaiKhoan.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N

        jXLabel_MatKhau.setText("Mật Khẩu");
        jXLabel_MatKhau.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N

        jXTextField_TenTaiKhoan.setEditable(false);
        jXTextField_TenTaiKhoan.setBackground(new java.awt.Color(255, 255, 255));
        jXTextField_TenTaiKhoan.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N

        jXTextField_LoaiTaiKhoan.setEditable(false);
        jXTextField_LoaiTaiKhoan.setBackground(new java.awt.Color(255, 255, 255));
        jXTextField_LoaiTaiKhoan.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N

        jXLabel_HinhAnhTK.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Manager.jpg"))); // NOI18N
        jXLabel_HinhAnhTK.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N

        jXLabel_TenTaiKhoan1.setText("Mã Tài Khoản");
        jXLabel_TenTaiKhoan1.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N

        jXTextField_MaTaiKhoan.setEditable(false);
        jXTextField_MaTaiKhoan.setBackground(new java.awt.Color(255, 255, 255));
        jXTextField_MaTaiKhoan.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N

        jPasswordField1.setEditable(false);
        jPasswordField1.setBackground(new java.awt.Color(255, 255, 255));
        jPasswordField1.setText("123456789");

        javax.swing.GroupLayout jXPanel_ThongTinLayout = new javax.swing.GroupLayout(jXPanel_ThongTin);
        jXPanel_ThongTin.setLayout(jXPanel_ThongTinLayout);
        jXPanel_ThongTinLayout.setHorizontalGroup(
            jXPanel_ThongTinLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jXPanel_ThongTinLayout.createSequentialGroup()
                .addGap(42, 42, 42)
                .addComponent(jXLabel_HinhAnhTK, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jXPanel_ThongTinLayout.createSequentialGroup()
                .addContainerGap(21, Short.MAX_VALUE)
                .addGroup(jXPanel_ThongTinLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(jXPanel_ThongTinLayout.createSequentialGroup()
                        .addComponent(jXLabel_TenTaiKhoan1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jXTextField_MaTaiKhoan, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jXPanel_ThongTinLayout.createSequentialGroup()
                        .addComponent(jXLabel_TenTaiKhoan, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(46, 46, 46)
                        .addComponent(jXTextField_TenTaiKhoan, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jXPanel_ThongTinLayout.createSequentialGroup()
                        .addGroup(jXPanel_ThongTinLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jXLabel_LoaiTaiKhoan, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jXLabel_MatKhau, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGroup(jXPanel_ThongTinLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(jXTextField_LoaiTaiKhoan, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jPasswordField1, javax.swing.GroupLayout.DEFAULT_SIZE, 121, Short.MAX_VALUE))))
                .addGap(29, 29, 29))
        );
        jXPanel_ThongTinLayout.setVerticalGroup(
            jXPanel_ThongTinLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jXPanel_ThongTinLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jXLabel_HinhAnhTK, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGroup(jXPanel_ThongTinLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jXPanel_ThongTinLayout.createSequentialGroup()
                        .addGap(31, 31, 31)
                        .addComponent(jXLabel_TenTaiKhoan1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(20, 20, 20))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jXPanel_ThongTinLayout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jXTextField_MaTaiKhoan, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)))
                .addGroup(jXPanel_ThongTinLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jXLabel_TenTaiKhoan, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jXTextField_TenTaiKhoan, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jXPanel_ThongTinLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jXLabel_LoaiTaiKhoan, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jXTextField_LoaiTaiKhoan, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jXPanel_ThongTinLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jXLabel_MatKhau, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jPasswordField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(165, Short.MAX_VALUE))
        );

        jMenuBar1.setBackground(new java.awt.Color(255, 255, 255));

        jMenu_HeThong.setBackground(new java.awt.Color(255, 255, 255));
        jMenu_HeThong.setText("Hệ Thống");

        jMenuItem_ThayDoiMatKhau.setBackground(new java.awt.Color(255, 255, 255));
        jMenuItem_ThayDoiMatKhau.setText("Thay đổi mật khẩu");
        jMenuItem_ThayDoiMatKhau.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem_ThayDoiMatKhauActionPerformed(evt);
            }
        });
        jMenu_HeThong.add(jMenuItem_ThayDoiMatKhau);

        jMenuItem_ThemTaiKhoan.setBackground(new java.awt.Color(255, 255, 255));
        jMenuItem_ThemTaiKhoan.setText("Thêm tài khoản");
        jMenuItem_ThemTaiKhoan.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem_ThemTaiKhoanActionPerformed(evt);
            }
        });
        jMenu_HeThong.add(jMenuItem_ThemTaiKhoan);

        jMenuBar1.add(jMenu_HeThong);

        jMenu_QuanLyPhong.setBackground(new java.awt.Color(255, 255, 255));
        jMenu_QuanLyPhong.setText("Quản Lý Phòng");

        jMenuItem_LapDanhMucPhong.setBackground(new java.awt.Color(255, 255, 255));
        jMenuItem_LapDanhMucPhong.setText("Lập danh mục phòng");
        jMenuItem_LapDanhMucPhong.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem_LapDanhMucPhongActionPerformed(evt);
            }
        });
        jMenu_QuanLyPhong.add(jMenuItem_LapDanhMucPhong);

        jMenuItem_TraCuuPhong.setBackground(new java.awt.Color(255, 255, 255));
        jMenuItem_TraCuuPhong.setText("Tra cứu phòng");
        jMenuItem_TraCuuPhong.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem_TraCuuPhongActionPerformed(evt);
            }
        });
        jMenu_QuanLyPhong.add(jMenuItem_TraCuuPhong);

        jMenuItem_TraCuuKhachHang.setBackground(new java.awt.Color(255, 255, 255));
        jMenuItem_TraCuuKhachHang.setText("Tra cứu khách hàng");
        jMenuItem_TraCuuKhachHang.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem_TraCuuKhachHangActionPerformed(evt);
            }
        });
        jMenu_QuanLyPhong.add(jMenuItem_TraCuuKhachHang);

        jMenuBar1.add(jMenu_QuanLyPhong);

        jMenu_QuanLyThueTra.setBackground(new java.awt.Color(255, 255, 255));
        jMenu_QuanLyThueTra.setText("Quản Lý Thuê - Trả");

        jMenuItem_LapPhieuThuePhong.setBackground(new java.awt.Color(255, 255, 255));
        jMenuItem_LapPhieuThuePhong.setText("Lập phiếu thuê phòng");
        jMenuItem_LapPhieuThuePhong.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem_LapPhieuThuePhongActionPerformed(evt);
            }
        });
        jMenu_QuanLyThueTra.add(jMenuItem_LapPhieuThuePhong);

        jMenuItem_LapHoaDon.setBackground(new java.awt.Color(255, 255, 255));
        jMenuItem_LapHoaDon.setText("Lập hóa đơn thanh toán");
        jMenuItem_LapHoaDon.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem_LapHoaDonActionPerformed(evt);
            }
        });
        jMenu_QuanLyThueTra.add(jMenuItem_LapHoaDon);

        jMenuItem_TraCuuHoaDon.setBackground(new java.awt.Color(255, 255, 255));
        jMenuItem_TraCuuHoaDon.setText("Tra cứu hóa đơn");
        jMenu_QuanLyThueTra.add(jMenuItem_TraCuuHoaDon);

        jMenuItem2.setBackground(new java.awt.Color(255, 255, 255));
        jMenuItem2.setText("Tìm kiếm thông tin khách hàng");
        jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem2ActionPerformed(evt);
            }
        });
        jMenu_QuanLyThueTra.add(jMenuItem2);

        jMenuBar1.add(jMenu_QuanLyThueTra);

        jMenu_ThayDoiQuyDinh.setBackground(new java.awt.Color(255, 255, 255));
        jMenu_ThayDoiQuyDinh.setText("Thay Đổi Quy Định");

        jMenuItem1.setBackground(new java.awt.Color(255, 255, 255));
        jMenuItem1.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jMenuItem1.setText("Cập nhật loại phòng");
        jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem1ActionPerformed(evt);
            }
        });
        jMenu_ThayDoiQuyDinh.add(jMenuItem1);

        jMenuItem_CapNhatDonGiaLoaiPhong.setBackground(new java.awt.Color(255, 255, 255));
        jMenuItem_CapNhatDonGiaLoaiPhong.setText("Cập nhật đơn giá loại phòng");
        jMenuItem_CapNhatDonGiaLoaiPhong.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem_CapNhatDonGiaLoaiPhongActionPerformed(evt);
            }
        });
        jMenu_ThayDoiQuyDinh.add(jMenuItem_CapNhatDonGiaLoaiPhong);

        jMenuItem_CapNhatHeSoLoaiKhach.setBackground(new java.awt.Color(255, 255, 255));
        jMenuItem_CapNhatHeSoLoaiKhach.setText("Cập nhật hệ số loại khách");
        jMenuItem_CapNhatHeSoLoaiKhach.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem_CapNhatHeSoLoaiKhachActionPerformed(evt);
            }
        });
        jMenu_ThayDoiQuyDinh.add(jMenuItem_CapNhatHeSoLoaiKhach);

        jMenuItem_ThemLoaiPhong.setBackground(new java.awt.Color(255, 255, 255));
        jMenuItem_ThemLoaiPhong.setText("Thêm loại phòng");
        jMenuItem_ThemLoaiPhong.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem_ThemLoaiPhongActionPerformed(evt);
            }
        });
        jMenu_ThayDoiQuyDinh.add(jMenuItem_ThemLoaiPhong);

        jMenuItem_ThemLoaiKhach.setBackground(new java.awt.Color(255, 255, 255));
        jMenuItem_ThemLoaiKhach.setText("Thêm loại khách hàng");
        jMenuItem_ThemLoaiKhach.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem_ThemLoaiKhachActionPerformed(evt);
            }
        });
        jMenu_ThayDoiQuyDinh.add(jMenuItem_ThemLoaiKhach);

        jMenuItem_ThayDoiTyLePhuThu.setBackground(new java.awt.Color(255, 255, 255));
        jMenuItem_ThayDoiTyLePhuThu.setText("Thay đổi tỷ lệ phụ thu");
        jMenuItem_ThayDoiTyLePhuThu.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem_ThayDoiTyLePhuThuActionPerformed(evt);
            }
        });
        jMenu_ThayDoiQuyDinh.add(jMenuItem_ThayDoiTyLePhuThu);

        jMenuItem_ThayDoiSoLuongKhachToiDa.setBackground(new java.awt.Color(255, 255, 255));
        jMenuItem_ThayDoiSoLuongKhachToiDa.setText("Thay đổi số lượng khách tối đa");
        jMenuItem_ThayDoiSoLuongKhachToiDa.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem_ThayDoiSoLuongKhachToiDaActionPerformed(evt);
            }
        });
        jMenu_ThayDoiQuyDinh.add(jMenuItem_ThayDoiSoLuongKhachToiDa);

        jMenuBar1.add(jMenu_ThayDoiQuyDinh);

        jMenu_BaoCao.setBackground(new java.awt.Color(255, 255, 255));
        jMenu_BaoCao.setText("Báo Cáo");

        jMenuItem_BaoCaoDoanhThu.setBackground(new java.awt.Color(255, 255, 255));
        jMenuItem_BaoCaoDoanhThu.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jMenuItem_BaoCaoDoanhThu.setText("Báo cáo doanh thu theo loại phòng");
        jMenuItem_BaoCaoDoanhThu.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem_BaoCaoDoanhThuActionPerformed(evt);
            }
        });
        jMenu_BaoCao.add(jMenuItem_BaoCaoDoanhThu);

        jMenuItem_BaoCaoMatDo.setBackground(new java.awt.Color(255, 255, 255));
        jMenuItem_BaoCaoMatDo.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jMenuItem_BaoCaoMatDo.setText("Báo cáo mật độ sử dụng phòng");
        jMenuItem_BaoCaoMatDo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem_BaoCaoMatDoActionPerformed(evt);
            }
        });
        jMenu_BaoCao.add(jMenuItem_BaoCaoMatDo);

        jMenuBar1.add(jMenu_BaoCao);

        jMenu_TroGiup.setBackground(new java.awt.Color(255, 255, 255));
        jMenu_TroGiup.setText("Trợ Giúp");

        jMenuItem_HuongDan.setBackground(new java.awt.Color(255, 255, 255));
        jMenuItem_HuongDan.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jMenuItem_HuongDan.setText("Hướng dẫn");
        jMenuItem_HuongDan.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem_HuongDanActionPerformed(evt);
            }
        });
        jMenu_TroGiup.add(jMenuItem_HuongDan);

        jMenuItem_ThongTin.setBackground(new java.awt.Color(255, 255, 255));
        jMenuItem_ThongTin.setText("Thông tin");
        jMenuItem_ThongTin.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem_ThongTinActionPerformed(evt);
            }
        });
        jMenu_TroGiup.add(jMenuItem_ThongTin);

        jMenuBar1.add(jMenu_TroGiup);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jXPanel_ThongTin, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jXPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jDesktopPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 1055, javax.swing.GroupLayout.PREFERRED_SIZE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jDesktopPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 698, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jXPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jXPanel_ThongTin, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jMenuItem_HuongDanActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem_HuongDanActionPerformed
        // TODO add your handling code here:
        
        try {
            File file=new File(".");
            String path=file.getAbsolutePath();
            path=path.substring(0,path.length()-1);
            System.out.println(path);
            path=path+"WinRAR.chm";
            //JOptionPane.showMessageDialog(null, path);
            Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + path);
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(null, ex);
            ex.printStackTrace();
        }
        
    }//GEN-LAST:event_jMenuItem_HuongDanActionPerformed

    private void jMenuItem_LapPhieuThuePhongActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem_LapPhieuThuePhongActionPerformed
        jfrm_LapPhieuThuePhong form = new jfrm_LapPhieuThuePhong();
        jDesktopPane1.removeAll();
        jDesktopPane1.add(form);
        form.setVisible(true);
    }//GEN-LAST:event_jMenuItem_LapPhieuThuePhongActionPerformed

    private void jMenuItem_LapHoaDonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem_LapHoaDonActionPerformed
        jfrm_LapHoaDonThanhToan form = new jfrm_LapHoaDonThanhToan();
        jDesktopPane1.removeAll();
        jDesktopPane1.add(form);
        form.setVisible(true);
    }//GEN-LAST:event_jMenuItem_LapHoaDonActionPerformed

    private void jMenuItem_BaoCaoDoanhThuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem_BaoCaoDoanhThuActionPerformed
        jfrm_BaoCaoDoanhThu form = new jfrm_BaoCaoDoanhThu();
        jDesktopPane1.removeAll();
        jDesktopPane1.add(form);
        form.setVisible(true);
    }//GEN-LAST:event_jMenuItem_BaoCaoDoanhThuActionPerformed

    private void jMenuItem_BaoCaoMatDoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem_BaoCaoMatDoActionPerformed
        jfrm_BaoCaoMatDo form = new jfrm_BaoCaoMatDo();
        jDesktopPane1.removeAll();
        jDesktopPane1.add(form);
        form.setVisible(true);
    }//GEN-LAST:event_jMenuItem_BaoCaoMatDoActionPerformed

    private void jMenuItem_ThayDoiMatKhauActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem_ThayDoiMatKhauActionPerformed
        new jfrm_ThayDoiMatKhau(taiKhoanInfo, null, true);
    }//GEN-LAST:event_jMenuItem_ThayDoiMatKhauActionPerformed

    private void jMenuItem_ThongTinActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem_ThongTinActionPerformed
        new jdag_ThongTin(this, true).setEnabled(true);
    }//GEN-LAST:event_jMenuItem_ThongTinActionPerformed

    private void jMenuItem_LapDanhMucPhongActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem_LapDanhMucPhongActionPerformed

        try {
            jDesktopPane1.removeAll();
            jDesktopPane1.add(jinternal_lapdanhmucphong);
            jinternal_lapdanhmucphong.setVisible(true);
        } catch (Exception ex) {
            Logger.getLogger(Menu.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_jMenuItem_LapDanhMucPhongActionPerformed

    private void jMenuItem_TraCuuPhongActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem_TraCuuPhongActionPerformed
        
        try {
            jDesktopPane1.removeAll();
            jDesktopPane1.add(jinternal_timkiem);
            jinternal_timkiem.setVisible(true);
        } catch (Exception ex) {
            Logger.getLogger(Menu.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_jMenuItem_TraCuuPhongActionPerformed

    private void jMenuItem_TraCuuKhachHangActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem_TraCuuKhachHangActionPerformed
        
    }//GEN-LAST:event_jMenuItem_TraCuuKhachHangActionPerformed

    private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem1ActionPerformed
        
        try {
            jDesktopPane1.removeAll();
            jDesktopPane1.add(jinternal_themloaiphong);
            jinternal_themloaiphong.setVisible(true);
        } catch (Exception ex) {
            Logger.getLogger(Menu.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_jMenuItem1ActionPerformed

    private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem2ActionPerformed
        try {
            jDesktopPane1.removeAll();
            jDesktopPane1.add(jinternal_timkiemkhachhang);
            jinternal_timkiemkhachhang.setVisible(true);
        } catch (Exception ex) {
            Logger.getLogger(Menu.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_jMenuItem2ActionPerformed

    private void jMenuItem_ThemTaiKhoanActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem_ThemTaiKhoanActionPerformed
        jfrm_ThemTaiKhoan form = new jfrm_ThemTaiKhoan();
        jDesktopPane1.removeAll();
        jDesktopPane1.add(form);
        form.setVisible(true);
    }//GEN-LAST:event_jMenuItem_ThemTaiKhoanActionPerformed

    private void jMenuItem_ThemLoaiPhongActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem_ThemLoaiPhongActionPerformed
        jfrm_ThemLoaiPhong form = new jfrm_ThemLoaiPhong();
        jDesktopPane1.removeAll();
        jDesktopPane1.add(form);
        form.setVisible(true);
    }//GEN-LAST:event_jMenuItem_ThemLoaiPhongActionPerformed

    private void jMenuItem_CapNhatDonGiaLoaiPhongActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem_CapNhatDonGiaLoaiPhongActionPerformed
        jfrm_CapNhatDonGiaLoaiPhong form = new jfrm_CapNhatDonGiaLoaiPhong();
        jDesktopPane1.removeAll();
        jDesktopPane1.add(form);
        form.setVisible(true);
    }//GEN-LAST:event_jMenuItem_CapNhatDonGiaLoaiPhongActionPerformed

    private void jMenuItem_ThemLoaiKhachActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem_ThemLoaiKhachActionPerformed
        jfrm_ThemLoaiKhachHang form = new jfrm_ThemLoaiKhachHang();
        jDesktopPane1.removeAll();
        jDesktopPane1.add(form);
        form.setVisible(true);
    }//GEN-LAST:event_jMenuItem_ThemLoaiKhachActionPerformed

    private void jMenuItem_CapNhatHeSoLoaiKhachActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem_CapNhatHeSoLoaiKhachActionPerformed
        jfrm_CapNhatLoaiKhachHang form = new jfrm_CapNhatLoaiKhachHang();
        jDesktopPane1.removeAll();
        jDesktopPane1.add(form);
        form.setVisible(true);
    }//GEN-LAST:event_jMenuItem_CapNhatHeSoLoaiKhachActionPerformed

    private void jMenuItem_ThayDoiTyLePhuThuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem_ThayDoiTyLePhuThuActionPerformed
        jfrm_ThayDoiTyLePhuThu form = new jfrm_ThayDoiTyLePhuThu();
        jDesktopPane1.removeAll();
        jDesktopPane1.add(form);
        form.setVisible(true);
    }//GEN-LAST:event_jMenuItem_ThayDoiTyLePhuThuActionPerformed

    private void jMenuItem_ThayDoiSoLuongKhachToiDaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem_ThayDoiSoLuongKhachToiDaActionPerformed
        try {
            jfrm_ThayDoiSoLuongKhachToiDa form = new jfrm_ThayDoiSoLuongKhachToiDa();
            jDesktopPane1.removeAll();
            jDesktopPane1.add(form);
            form.setVisible(true);
        } catch (Exception ex) {
            Logger.getLogger(Menu.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_jMenuItem_ThayDoiSoLuongKhachToiDaActionPerformed
     
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(Menu.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(Menu.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(Menu.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(Menu.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
//                SplashScreen splash = new SplashScreen();
//                splash.showSplash();
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JDesktopPane jDesktopPane1;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenuItem jMenuItem1;
    private javax.swing.JMenuItem jMenuItem2;
    private javax.swing.JMenuItem jMenuItem_BaoCaoDoanhThu;
    private javax.swing.JMenuItem jMenuItem_BaoCaoMatDo;
    private javax.swing.JMenuItem jMenuItem_CapNhatDonGiaLoaiPhong;
    private javax.swing.JMenuItem jMenuItem_CapNhatHeSoLoaiKhach;
    private javax.swing.JMenuItem jMenuItem_HuongDan;
    private javax.swing.JMenuItem jMenuItem_LapDanhMucPhong;
    private javax.swing.JMenuItem jMenuItem_LapHoaDon;
    private javax.swing.JMenuItem jMenuItem_LapPhieuThuePhong;
    private javax.swing.JMenuItem jMenuItem_ThayDoiMatKhau;
    private javax.swing.JMenuItem jMenuItem_ThayDoiSoLuongKhachToiDa;
    private javax.swing.JMenuItem jMenuItem_ThayDoiTyLePhuThu;
    private javax.swing.JMenuItem jMenuItem_ThemLoaiKhach;
    private javax.swing.JMenuItem jMenuItem_ThemLoaiPhong;
    private javax.swing.JMenuItem jMenuItem_ThemTaiKhoan;
    private javax.swing.JMenuItem jMenuItem_ThongTin;
    private javax.swing.JMenuItem jMenuItem_TraCuuHoaDon;
    private javax.swing.JMenuItem jMenuItem_TraCuuKhachHang;
    private javax.swing.JMenuItem jMenuItem_TraCuuPhong;
    private javax.swing.JMenu jMenu_BaoCao;
    private javax.swing.JMenu jMenu_HeThong;
    private javax.swing.JMenu jMenu_QuanLyPhong;
    private javax.swing.JMenu jMenu_QuanLyThueTra;
    private javax.swing.JMenu jMenu_ThayDoiQuyDinh;
    private javax.swing.JMenu jMenu_TroGiup;
    private javax.swing.JPasswordField jPasswordField1;
    private javax.swing.JScrollPane jScrollPane1;
    private org.jdesktop.swingx.JXLabel jXLabel_HinhAnhTK;
    private org.jdesktop.swingx.JXLabel jXLabel_LoaiTaiKhoan;
    private org.jdesktop.swingx.JXLabel jXLabel_MatKhau;
    private org.jdesktop.swingx.JXLabel jXLabel_TenTaiKhoan;
    private org.jdesktop.swingx.JXLabel jXLabel_TenTaiKhoan1;
    private org.jdesktop.swingx.JXPanel jXPanel1;
    private org.jdesktop.swingx.JXPanel jXPanel_ThongTin;
    private org.jdesktop.swingx.JXTextField jXTextField_LoaiTaiKhoan;
    private org.jdesktop.swingx.JXTextField jXTextField_MaTaiKhoan;
    private org.jdesktop.swingx.JXTextField jXTextField_TenTaiKhoan;
    private org.jdesktop.swingx.JXTree jXTree_menu;
    // End of variables declaration//GEN-END:variables
}
